package cn.jltx.ndkcallback.javajni;

/**
 * @author jltxseo
 *         Created by junlintianxia on 2016/04/21.
 */
public class DataProvider {
    static {
        System.loadLibrary("callbackProvider");
    }
    public void helloFromJava(){
        System.out.println("hello from java");
    }


    public int Add(int x,int y){
        int result = x+y;
        System.out.println("java result"+result);
        return result;
    }

    public void printString(String s){
        System.out.println("java"+s);
    }

    public static void printStaticStr(String s){
        System.out.println("java "+s);
    }

    //让c代码调用对应的java代码
    public native void callmethod1();
    public native void callmethod2();
    public native void callmethod3();
    //调用一个静态的c代码
    public native void callmethod4();
}
